package com.sale.system.mapper;

import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.system.api.domain.dto.SysAuxiliaryUnitDateDetailResultDto;
import com.sale.system.domain.SysAuxiliaryDetail;
import com.sale.system.domain.SysAuxiliaryUnitDetail;
import com.sale.system.domain.dto.AuxiliaryUnitConversionDto;
import com.sale.system.domain.dto.SysAuxiliaryUnitDateDetailDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: YSL
 * @Date: 2023/7/14 9:46
 * @Desc: 辅助单位明细 数据层
 */
public interface SysAuxiliaryUnitDetailMapper extends BaseMapperPlus<SysAuxiliaryUnitDetailMapper, SysAuxiliaryUnitDetail, SysAuxiliaryUnitDetail> {

    /**
     * 删除辅助单位明细
     * @param auxiliaryId
     * @return
     */
    int deleteByAuxiliaryUnitId(Long auxiliaryId);

    /**
     * 查询单个辅助单位明细
     * @param auxiliaryId
     * @return
     */
    List<SysAuxiliaryUnitDetail> selectMultiUnitList(Long auxiliaryId);


    /**
     * 查询单个辅助单位明细
     * @param auxiliaryId
     * @return
     */
    List<AuxiliaryUnitConversionDto> getMultiUnitById(Long auxiliaryId);

    /**
     * 根据auxiliary_id 查询多单位信息
     * @param materialMoreUnit
     * @return
     */
    List<SysAuxiliaryUnitDetail> findByAuxiliaryId(Long materialMoreUnit);


    /**
     * 查多个单位的基础单位
     */
    List<SysAuxiliaryUnitDateDetailResultDto> selectMoreUnitBasics(Long unitId);

}
